//
//  HJGitCell.m
//  project
//
//  Created by hu on 2019/3/29.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJGitCell.h"
#import "HJGitView.h"
@interface HJGitCell ()
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *surplus;
@property (weak, nonatomic) IBOutlet UIImageView *contentImage;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UIButton *money;

@end

@implementation HJGitCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setGiftModel:(HJGiftListModel *)giftModel {
    [self.contentImage sd_setImageWithURL:[NSURL URLWithString:giftModel.icon]];
    self.name.text = giftModel.name;
    self.surplus.text = [NSString stringWithFormat:@"余%@",giftModel.amount];
    [self.money setTitle:giftModel.price forState:0];
    if (giftModel.isSelecte) {
        self.bgView.layer.cornerRadius = 10;
        self.bgView.layer.masksToBounds = YES;
        self.bgView.layer.borderWidth = 1.0;
        self.bgView.layer.borderColor = [UIColor colorWithHex:0xfe698f].CGColor;
    }else {
        self.bgView.layer.cornerRadius = 10;
        self.bgView.layer.masksToBounds = YES;
        self.bgView.layer.borderWidth = 1.0;
        self.bgView.layer.borderColor = [UIColor colorWithHex:0xffffff].CGColor;
    }
}
@end
